<template>
  <div class="bigBox">
    <div class="centerBox">
      <div class="boxHead">申请审核</div>
        <div class="box_body">
          <el-form
            :model="ruleForm"
            :rules="rules"
            ref="ruleForm"
            label-width="120px"
            class="demo-ruleForm"
          >
         <el-form-item label="回复意见：">
          <el-input type="textarea" readonly v-model="form.remarks" :autosize="{ minRows: 2, maxRows: 4}"  placeholder="请输入延期事由"></el-input>
        </el-form-item>
          <el-form-item label="审核意见：">
              <el-select v-model="ruleForm.approverStatus" placeholder="请选择">
                <el-option label="通过" value="1"></el-option>
                <el-option label="驳回" value="0"></el-option>
              </el-select>
        </el-form-item>
        <el-form-item label="备注：">
          <el-input type="textarea" v-model="ruleForm.approvalOpinion" :autosize="{ minRows: 2, maxRows: 4}"  placeholder="请输入备注"></el-input>
        </el-form-item>
        <el-form-item class="btnBox">
          <el-button type="primary" @click="submitForm('ruleForm')"
            >确定</el-button
          >
          <el-button @click="resetForm('ruleForm')">取消</el-button>
        </el-form-item>
      </el-form>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DispatchDialog2",
  props: ['data'],
  data() {
    return {
      ruleForm: {   
        id:'',
        approverStatus:'1',
        actualDelayTo: "",
        approvalOpinion:'',
      },
      remarks:'',
    };
  },
  created() {
    this.ruleForm.id=this.data.id
    this.ruleForm.actualDelayTo = this.data.delayTo
  },
  methods: {
    submitForm(formName) {
      this.$refs[formName].resetFields();
        this.$emit('submit');
      },
      resetForm(formName) {
        this.$refs[formName].resetFields();
        this.$emit('childFn');
      }
  },
};
</script>

<style lang="scss" scoped>
.bigBox {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 2000;
  .centerBox{
    width: 500px;
    height: 440px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -150px;
    margin-left: -230px;
    background-color: #fff;
    border-radius: 4px;
    .boxHead{
      height: 46px;
      background-color: #127ce4;
      color: #fff;
      font-size: 14px;
      line-height: 46px;
      padding: 0 16px;
      border-radius: 4px 4px 0 0;
    }
    .box_body{
      margin-top: 12px;
      padding: 16px;
      .el-date-editor.el-input,.el-select{
        width: 100%;
      }
      .btnBox{
        margin-top: 60px;
      }
    }
  }
}
</style>
